package bean;

import java.sql.Connection;
import java.sql.DriverManager;

public class MyOracle {
	Connection conn;
	
	public MyOracle()
	{
		String driver = "oracle.jdbc.driver.OracleDriver";
		String url = "jdbc:oracle:thin:@127.0.0.1:1521:xe";
		String db_user = "hr";
		String db_pwd = "hr";
		try
		{
			Class.forName(driver);
//			System.out.println("드라이버 로딩ok.");
			conn = DriverManager.getConnection(url, db_user, db_pwd);
//			System.out.println("커넥션 생성ok.");
		}
		catch(Exception ex)
		{
			ex.printStackTrace();
		}
	}
	public Connection getConn()
	{
		return conn;
	}
//	
//	public static void main(String[] args)
//	{
//		MyOracle mo = new MyOracle();
//	}
}
